{template aljbd:index_header}
{if $settings['templatepx']['value']}
	{template aljbd:footercss}
{/if}
<style type="text/css">
	.bdtr {
		 padding-left: 10px !important;
	}
</style>
<script src="static/js/seditor.js" type="text/javascript" reload="1"></script>
<script type="text/javascript" src="static/js/calendar.js"></script>
<script charset="$_G['charset']" src="source/plugin/aljbd/js/editor/kindeditor-min.js" reload="true"></script>
<!--{if $_G['charset']=='gbk'}-->
<script charset="gbk" src="source/plugin/aljbd/js/editor/lang/zh_CN.js" reload="true"></script>
<!--{else}-->
<script charset="utf-8" src="source/plugin/aljbd/js/editor/lang/zh_CN_U8.js" reload="true"></script>
<!--{/if}-->
<script type="text/javascript" reload="true">
        KindEditor.ready(function(K) {
              window.editor = KindEditor.create('#intro', {
					resizeType : 1,
					allowPreviewEmoticons : false,
					allowImageUpload : true,
					items : [
						'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
        'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
        'superscript', 'clearhtml', 'quickformat', 'selectall', '/', 'fullscreen',
        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
        'table', 'hr', 'emoticons', 'pagebreak',
        'anchor', 'link', 'unlink']
				});
        });
		KindEditor.options.cssData = 'img { max-width:400px; }';
</script>
<div class="wp">
<div class="bm cl" id="pt">
<div class="z">
<a title="{$_G['setting']['bbname']}" class="nvhm" href="./">{$_G['setting']['bbname']}</a> <em>&rsquot;</em>
        <a href="plugin.php?id=aljbd">{$config['aljbd_plugins']}</a>
</div>
</div>
<div class="ct2_a wp cl" id="ct">
<div class="appl">
<div class="tbn">
<h2 class="mt bbda">{$config['aljbd_plugins']}</h2>
{template aljbd:mnav}
</div>
</div>
<iframe  name="formsubmit" style="display:none;"></iframe>
<div  style="float:left;">
<h1 class="ph mbm xi1" style="margin-left:10px;">{if $_GET['act']=='addconsume'}{lang aljbd:addconsume_1}{else}{lang aljbd:addconsume_2}{/if}</h1>
<form enctype="multipart/form-data" target="formsubmit"  action="plugin.php?id=aljbd&act={$_GET['act']}" autocomplete="off" id="addgoods_form" method="post">
 <input type="hidden" name="formhash" value="{FORMHASH}">
 <input type="hidden" name="cid" value="{$_GET['nid']}">
 <input type="hidden" name="bid" value="{$bid}">
 <input type="hidden" name="compress" value="" id="compress">
 <input type="hidden" name="aljbd_consume_token" value="{eval echo create_token('aljbd_consume_token');}">
  <table cellspacing="0" cellpadding="0" class="tfm">
      <tbody>
         <tr>
				<th class="bdtr"><span style="color:red;">*</span>{lang aljbd:s283}</th>
				  
					<td>
						{eval echo dhtmlspecialchars($bd['name']);}
					</td>
				  <td>&nbsp;</td>
			  </tr>
				<tr>
    				<th class="bdtr"><span style="color:red;">*</span>{lang aljbd:addconsume_3}</th>
    				<td colspan="4"><input type="text" name="name" class="px" value="$n['subject']" ></td>
                </tr>
		  <tr>
						<td class="bdtr"><span style="color:red;">*</span>{lang aljbd:s223}</td>
    				<td colspan="4">
						<select name="type" id="type" style="width:120px;" data-id="1" onchange="getregion(this,'consume')">
							<option value="">{lang aljbd:s224}</option>
							<!--{loop $typelist $typeid $type}-->
							<option value="$typeid" {if $typeid==$n['type']}selected{/if}>$type['subject']</option>
							<!--{/loop}-->
						</select>
						&nbsp;&nbsp;&nbsp;
						<span name="subtype" id="subtype">
						{if $n['subtype']}
						<select name="subtype" id="type" style="width:120px;">
							<!--{loop C::t('#aljbd#aljbd_type_consume')->fetch_all_by_upid($n['type']) $typeid $type}-->
							<option value="$typeid" {if $typeid==$n['subtype']}selected{/if}>$type['subject']</option>
							<!--{/loop}-->
						</select>
						{/if}
						</span>
					</td>
				</tr>
				<script type="text/javascript">
				function getregion(t,u){
					var url ='';
					if(u !='u'){
						var name = 'subtype3';
						if(jq(t).attr('data-id') == 1){
							var name = 'subtype';
						}
					}else{
						var name = 'region1';
						if(jq(t).attr('data-id') == 1){
							var name = 'subregion';
						}
					}
					if(u){
						url = '&type='+u; 
					}
					var str = '<select name="'+name+'" onchange="getregion(this,\''+u+'\')" style="width:120px;"><option value="">\u8bf7\u9009\u62e9</option>';
					jq.post('plugin.php?id=$pluginid&act=linkage&upid='+jq(t).val()+url,function(data){
						if(data){
							jq.each(data,function(k,d){
							str+='<option value="'+k+'">'+d+'</option>';
							});
							str+='</select>';
							jq(t).next().remove();
							jq(t).after(str);
						}
						
					}, "json");
				}
				</script>
				<tr>
    				<th class="bdtr"><span style="color:red;">*</span>{lang aljbd:addconsume_4}</th>
    				<td colspan="4"><span id="logo"><input type="file" name="logo" id="logo" onchange="lrz_mobile('logo',this)"></span><font color="red">555*345</font></td>
                </tr>
				
				<tr><td width="100" height="30"></td><td colspan="4"><span id="img_logo">{if $n['pic']}<img src="$n['pic']" width="80px" height="80px">{/if}</span></td></tr>
				
				<tr>
				<th class="bdtr"><span style="color:red;">*</span>{lang aljbd:addconsume_5}</th>
				<td colspan="4">
					
					<textarea fwin="apply" rows="3" name="jieshao" class="pt" id="intro" style="background:#FFF;">$n['jieshao']</textarea>
					
				</td>
				</tr>
				<tr>
				<th class="bdtr"><span style="color:red;">&nbsp;</span>{lang aljbd:addconsume_6}</th>
				<td colspan="4">
					<div class="tedt" style="width:100%;">
					<div class="bar">
					<div class="fpd">
					<a href="javascript:;" title="{lang aljbd:s240}" class="fbld" onclick="seditor_insertunit('reply', '[b]', '[/b]');doane(event);">B</a>
					<a fwin="apply" href="javascript:;" title="{lang aljbd:s241}" class="fclr" id="replyforecolor" onclick="showColorBox(this.id, 2, 'reply');doane(event);" initialized="true">Color</a>
					<a fwin="apply" id="replyimg" href="javascript:;" title="{lang aljbd:s242}" class="fmg" onclick="seditor_menu('reply', 'img');doane(event);">Image</a>
					<a fwin="apply" id="replyurl" href="javascript:;" title="{lang aljbd:s243}" class="flnk" onclick="seditor_menu('reply', 'url');doane(event);">Link</a>
					</div></div>
					<div class="area" style="background:#FFF;">
					<textarea fwin="apply" rows="3" name="xianzhi" class="pt" id="replymessage" style="background:#FFF;">$n['xianzhi']</textarea>
					</div>
					</div>
				</td>
				</tr>
				<tr>
				<th class="bdtr"><span style="color:red;">&nbsp;</span>{lang aljbd:addconsume_7}</th>
				<td colspan="4">
					
					<input type="text" value="{if $n['end']}<!--{eval echo date('Y-m-d H:i:s',$n['end']);}-->{/if}" name="end" class="txt" onclick="showcalendar(event, this, 1)" style="width:100px;">&nbsp;{lang aljbd:addconsume_8}
					
				</td>
				</tr>
				<tr>
				<th class="bdtr"><span style="color:red;">&nbsp;</span>{lang aljbd:addconsume_9}</th>
				<td colspan="4">
					<textarea name="mianze" rows="2" cols="53">{if $n['mianze']}$n['mianze']{else}{$config['mianze']}{/if}</textarea>
				</td>
				</tr>
          <tr>
              <th></th>
              <td colspan="2"><button  class="pn pnc vm" value="true" id="submit" name="submit" type="submit" onClick="javascript:checkhHtml5();"><strong>{lang aljbd:s289}</strong></button></td>
          </tr>
      </tbody>
  </table>
  </form>
</div></div></div>
{template aljbd:img_js}
{template common/footer}